import crypto from 'crypto';

const md5 = (str: string) => {
    const md5 = crypto.createHash('md5');
    md5.update(str);
    return md5.digest('hex');
};

export const signature = (t, d) => {
    let e = d;
    let n = md5("".concat("VDsdxfwljhy#@!94857", "access-token=").concat(t).concat(e.slice(0, 11), "AAXY"));
    return "sign=".concat(n, "&timestamp=").concat(e);
}